Explaratory Data Analysis

The goal of the exploratory analysis is to identify the key predictors, generate insights and dicover trends and patters. Throughout this process we are mainly interested in detecting:

  • Correlation and assoicitations
  • Trends in time e.g viral load
  • Outliers
  • Any other key information that might be useful in ML modeling

Assumptions

  • AMPATH civil status is collected longitudinal; as such missing data on the crossectional dataset has to be replaced with longitudinal civil status recorded not > 3 months after the first encounter
  • We have assumed if is.na(transfer) then No else Yes
  • Unrecorded data (occurring at the 1st encounter) on Height, Weight, BMI, NHIF have to be replaced with non-null next encounter recorded < 3 months from the first encounter
  • Viral Load index - It is not possible to know when the next VL is drawn longitudinally, as shown in the table below. As such, we are treating each VL result as individual tests ordered independently.
ptidno visit_num apptdate VLundetectable viralload viralloadc Height
52764 1 2017-01-01 NA NA NA
52764 2 2017-04-25 NA NA 162
52764 3 2017-05-24 NA NA 161
52764 4 2017-06-28 NA NA 162
52764 5 2017-07-21 NA 40 < 162
52764 6 2017-08-22 NA NA 162
52764 7 2017-09-12 NA NA 162
52764 8 2017-10-16 NA NA 162
52764 9 2017-11-20 NA NA 162
52764 10 2017-12-18 NA NA 162
52764 11 2018-01-01 NA 40 < 162
52764 12 2018-02-19 NA NA 162
52764 13 2018-03-06 NA NA 162
52764 14 2018-05-07 NA 40 < 162
52764 15 2018-06-05 NA NA 162
52764 16 2018-09-10 NA NA 162
52764 17 2018-12-04 NA 40 < 162
52764 18 2019-01-01 NA NA 162
52764 19 2019-04-26 NA NA 173
52764 20 2019-07-17 NA NA 173
52764 21 2019-10-11 NA 40 < NA
52764 22 2019-10-14 NA NA NA
52764 23 2019-11-13 NA NA NA

Viral Load Counts

We will start by looking at the overall distribution of VL

Distribution

Is a cutoff of 1000 valid with relation to VL detectability limit? To understll start by decomposing the viral load counts into its three components that is inline with the goal of our analyis- Viral load 1, viral load 2 and viral load 3.

Overall Viral Load Counts Detection Limit

MBARARA Viral Load Detection Limit

MASAKA Viral Load Detection Limit

RAKAI Viral Load Detection Limit

IDI Viral Load Detection Limit

AMPATH Viral Load Detection Limit

FACES Viral Load Detection Limit

KISESA Viral Load Detection Limit

MOROGORO Viral Load Detection Limit

TUMBI Viral Load Detection Limit

We also need to look if this is consisten with VL index

Viral Load 1 Detection Limit

Viral Load 2 Detection Limit

Viral Load 3 Detection Limit

Viral Load Count | Programs

Table 1: Socio-demographics
  Programs
Total
No. 86,738
  AMPATH
No. 42,756
FACES
No. 10,329
IDI
No. 2,244
KISESA
No. 1,306
MASAKA
No. 4,267
MBARARA
No. 2,963
MOROGORO
No. 1,785
RAKAI
No. 19,688
TUMBI
No. 1,400
First VL count
  Mean (SD) 19000.6 (±179970.1)   23053.8 (±199645.1) 8389.8 (±74601.5) 24852.3 (±151037.5) 5645.5 (±47117.6) 33393.1 (±228247.3) 13532.4 (±74402.9) 34232.0 (±392656.5) 7659.3 (±106509.1) 25984.5 (±299410.3)
  Median (IQR) 40.0 (40.0 - 400.0)   40.0 (40.0 - 326.0) 40.0 (40.0 - 40.0) 50.0 (20.0 - 75.0) 20.0 (20.0 - 20.0) 60.0 (50.0 - 321.5) 400.0 (400.0 - 550.0) 20.0 (20.0 - 62.5) 40.0 (40.0 - 146.0) 20.0 (20.0 - 36.5)
  Missing 48,470 (55.9%)   20,495 (47.9%) 7,490 (72.5%) 1,006 (44.8%) 901 (69.0%) 3,024 (70.9%) 1,303 (44.0%) 1,167 (65.4%) 12,263 (62.3%) 821 (58.6%)
Second VL count
  Mean (SD) 14136.7 (±161008.3)   15126.9 (±152865.0) 7061.6 (±72871.3) 41924.2 (±430577.6) 5632.1 (±43522.7) 40228.3 (±239249.3) 10022.7 (±70370.9) 7385.5 (±56205.0) 9084.2 (±167204.8) 8549.8 (±70230.5)
  Median (IQR) 40.0 (40.0 - 283.0)   40.0 (40.0 - 263.0) 40.0 (40.0 - 40.0) 50.0 (50.0 - 91.0) 20.0 (20.0 - 20.0) 64.0 (50.0 - 524.0) 400.0 (400.0 - 400.0) 20.0 (20.0 - 80.8) 40.0 (40.0 - 47.2) 20.0 (20.0 - 20.0)
  Missing 60,657 (69.9%)   25,931 (60.6%) 8,585 (83.1%) 1,615 (72.0%) 1,159 (88.7%) 3,854 (90.3%) 1,674 (56.5%) 1,565 (87.7%) 15,276 (77.6%) 998 (71.3%)
Third VL count
  Mean (SD) 13619.4 (±843866.8)   7716.8 (±66888.2) 2531.1 (±38434.5) 36871.7 (±259921.0) 4197.2 (±17214.7) 20924.4 (±87010.1) 5087.8 (±38920.1) 2164.8 (±7729.2) 52407.1 (±2318351.4) 5266.0 (±35003.5)
  Median (IQR) 40.0 (40.0 - 197.0)   40.0 (40.0 - 187.5) 40.0 (40.0 - 40.0) 50.0 (50.0 - 122.0) 20.0 (20.0 - 20.0) 77.0 (50.0 - 749.0) 400.0 (400.0 - 400.0) 20.0 (20.0 - 20.0) 40.0 (40.0 - 40.0) 20.0 (20.0 - 20.0)
  Missing 68,926 (79.5%)   29,993 (70.1%) 9,065 (87.8%) 1,955 (87.1%) 1,289 (98.7%) 4,168 (97.7%) 2,167 (73.1%) 1,752 (98.2%) 17,343 (88.1%) 1,194 (85.3%)
Days (from enrollment) to first VL
  Mean (SD) 398.4 (±363.4)   317.0 (±257.1) 340.2 (±232.9) 396.0 (±324.6) 265.4 (±139.1) 456.4 (±314.9) 233.5 (±138.2) 310.7 (±212.7) 720.8 (±530.8) 221.5 (±111.0)
  Median (IQR) 254.0 (191.0 - 483.0)   230.0 (184.0 - 384.0) 236.0 (192.0 - 425.0) 293.0 (194.0 - 560.0) 226.0 (170.0 - 322.0) 324.0 (206.0 - 636.0) 203.0 (175.8 - 252.0) 231.0 (191.0 - 364.0) 579.0 (278.0 - 1037.0) 189.0 (174.0 - 235.5)
  Missing 48,470 (55.9%)   20,495 (47.9%) 7,490 (72.5%) 1,006 (44.8%) 901 (69.0%) 3,024 (70.9%) 1,303 (44.0%) 1,167 (65.4%) 12,263 (62.3%) 821 (58.6%)
Days (from enrollment) to second VL
  Mean (SD) 698.2 (±395.8)   621.1 (±296.5) 590.7 (±297.6) 798.4 (±400.6) 476.1 (±139.8) 740.2 (±303.3) 533.4 (±187.9) 667.5 (±237.8) 1094.8 (±554.6) 467.8 (±161.1)
  Median (IQR) 594.0 (413.0 - 854.0)   572.0 (401.0 - 762.0) 470.5 (376.0 - 760.2) 734.0 (496.0 - 1114.0) 467.0 (380.5 - 589.5) 675.0 (534.0 - 964.0) 551.0 (399.0 - 620.0) 628.5 (524.2 - 822.0) 1051.5 (632.0 - 1527.0) 440.0 (356.2 - 568.0)
  Missing 60,657 (69.9%)   25,931 (60.6%) 8,585 (83.1%) 1,615 (72.0%) 1,159 (88.7%) 3,854 (90.3%) 1,674 (56.5%) 1,565 (87.7%) 15,276 (77.6%) 998 (71.3%)
Days (from enrollment) to third VL
  Mean (SD) 982.9 (±390.5)   931.6 (±324.9) 919.9 (±337.0) 1059.8 (±416.3) 642.1 (±126.8) 948.6 (±238.2) 801.1 (±265.6) 840.5 (±241.9) 1373.6 (±533.4) 766.8 (±189.6)
  Median (IQR) 931.0 (716.0 - 1177.2)   912.0 (705.0 - 1119.0) 828.0 (710.5 - 1133.0) 1088.0 (688.0 - 1408.0) 608.0 (548.0 - 744.0) 938.0 (768.5 - 1116.0) 873.0 (622.5 - 977.0) 914.0 (676.0 - 1002.0) 1370.0 (952.0 - 1802.0) 783.0 (647.2 - 896.2)
  Missing 68,926 (79.5%)   29,993 (70.1%) 9,065 (87.8%) 1,955 (87.1%) 1,289 (98.7%) 4,168 (97.7%) 2,167 (73.1%) 1,752 (98.2%) 17,343 (88.1%) 1,194 (85.3%)
Days (from 1st VL) to second VL
  Mean (SD) 320.4 (±200.3)   301.6 (±160.6) 260.4 (±126.5) 474.7 (±319.8) 213.4 (±91.0) 351.6 (±183.7) 307.1 (±115.8) 348.7 (±127.0) 403.8 (±307.6) 243.8 (±110.4)
  Median (IQR) 335.0 (183.0 - 382.0)   336.0 (185.0 - 376.0) 216.0 (175.0 - 363.0) 384.0 (222.0 - 721.0) 203.0 (172.0 - 248.0) 343.0 (223.0 - 413.0) 344.0 (207.0 - 371.0) 367.0 (320.8 - 400.0) 349.0 (181.0 - 528.5) 210.5 (172.0 - 323.5)
  Missing 60,657 (69.9%)   25,931 (60.6%) 8,585 (83.1%) 1,615 (72.0%) 1,159 (88.7%) 3,854 (90.3%) 1,674 (56.5%) 1,565 (87.7%) 15,276 (77.6%) 998 (71.3%)
Days (from 2nd VL) to thrid VL
  Mean (SD) 303.3 (±153.2)   299.5 (±136.6) 310.5 (±119.4) 416.0 (±286.7) 248.8 (±122.5) 300.8 (±139.3) 271.7 (±126.2) 286.8 (±135.9) 316.7 (±221.4) 311.9 (±115.8)
  Median (IQR) 341.0 (190.0 - 371.0)   343.0 (195.0 - 371.0) 356.5 (209.0 - 371.0) 357.0 (196.0 - 574.0) 225.0 (175.0 - 363.0) 314.0 (214.0 - 371.5) 316.0 (181.8 - 363.0) 337.0 (172.0 - 370.0) 309.0 (154.0 - 392.0) 357.0 (213.8 - 377.0)
  Missing 68,926 (79.5%)   29,993 (70.1%) 9,065 (87.8%) 1,955 (87.1%) 1,289 (98.7%) 4,168 (97.7%) 2,167 (73.1%) 1,752 (98.2%) 17,343 (88.1%) 1,194 (85.3%)
# of encounter B4 first VL
  Mean (SD) 8.2 (±5.8)   6.9 (±4.1) 9.4 (±4.4) 8.8 (±5.5) 7.8 (±3.5) 8.6 (±4.7) 4.1 (±2.1) 7.0 (±3.6) 12.5 (±8.7) 6.8 (±2.6)
  Median (IQR) 7.0 (5.0 - 10.0)   6.0 (5.0 - 9.0) 8.0 (7.0 - 11.0) 8.0 (5.0 - 12.0) 7.0 (5.0 - 10.0) 7.0 (5.0 - 11.0) 4.0 (3.0 - 5.0) 7.0 (5.0 - 8.0) 10.0 (6.0 - 17.0) 7.0 (6.0 - 8.0)
  Missing 48,470 (55.9%)   20,495 (47.9%) 7,490 (72.5%) 1,006 (44.8%) 901 (69.0%) 3,024 (70.9%) 1,303 (44.0%) 1,167 (65.4%) 12,263 (62.3%) 821 (58.6%)
# of encounter B4 second VL
  Mean (SD) 13.0 (±6.8)   11.5 (±4.9) 14.1 (±5.4) 15.3 (±6.4) 13.4 (±3.6) 13.1 (±5.1) 7.8 (±2.6) 13.4 (±4.7) 19.7 (±9.8) 12.7 (±3.7)
  Median (IQR) 12.0 (9.0 - 16.0)   11.0 (8.0 - 14.0) 13.0 (10.0 - 17.0) 15.0 (11.0 - 19.0) 13.0 (11.0 - 15.0) 12.0 (9.0 - 16.0) 7.0 (6.0 - 9.0) 12.0 (10.0 - 15.0) 18.0 (12.0 - 25.0) 12.0 (10.0 - 14.0)
  Missing 60,657 (69.9%)   25,931 (60.6%) 8,585 (83.1%) 1,615 (72.0%) 1,159 (88.7%) 3,854 (90.3%) 1,674 (56.5%) 1,565 (87.7%) 15,276 (77.6%) 998 (71.3%)
# of encounter B4 third VL
  Mean (SD) 17.4 (±7.2)   16.1 (±5.7) 19.4 (±6.0) 20.1 (±6.8) 17.7 (±3.7) 18.0 (±4.8) 10.9 (±3.3) 18.0 (±4.1) 24.8 (±10.0) 19.7 (±5.0)
  Median (IQR) 16.0 (13.0 - 21.0)   16.0 (13.0 - 19.0) 19.0 (15.0 - 23.0) 20.0 (16.0 - 24.0) 17.0 (15.0 - 19.0) 18.0 (14.5 - 21.0) 11.0 (9.0 - 13.0) 18.0 (16.0 - 20.0) 23.0 (18.0 - 31.0) 20.0 (16.2 - 23.0)
  Missing 68,926 (79.5%)   29,993 (70.1%) 9,065 (87.8%) 1,955 (87.1%) 1,289 (98.7%) 4,168 (97.7%) 2,167 (73.1%) 1,752 (98.2%) 17,343 (88.1%) 1,194 (85.3%)
‡

Missing Data

Socio-demographics Missing Data Summary

variable n_miss pct_miss
nhif 83396 96.147018
vl_count3 68926 79.464595
vl_count2 60657 69.931287
vl_count1 48470 55.880929
entrypoint 46852 54.015541
civilstatusENROL 22158 25.545897
bmi 19876 22.914985
Height 19581 22.574881
ageatarvstart 11592 13.364385
Weight 6309 7.273629
male 0 0.000000
Death 0 0.000000
transfer 0 0.000000
program 0 0.000000

Bivariate Analysis

To understand the relationship of each variable with the outcome variable:

Socio-demographics

Overall Socio-demographics Correlation

Socio-demographics | Viral Load Failure 1

Table 2: Socio-demographics
  First Virologic Failure  
Total
No. 38,268
  No
No. 32,723
Yes
No. 5,545
  P-value
age at first exposure to ARV 0.49
  Mean (SD) 36.2 (±10.8)   36.2 (±10.8) 36.3 (±10.8)  
  Median (IQR) 34.5 (28.1 - 42.7)   34.5 (28.1 - 42.6) 34.6 (28.1 - 42.9)  
  Missing 685 (1.8%)   549 (1.7%) 136 (2.5%)  
male gender 0.004
  No 24,425 (63.8%)   20,982 (85.9%) 3,443 (14.1%)  
  Yes 13,843 (36.2%)   11,741 (84.8%) 2,102 (15.2%)  
death < 0.0001
  No 37,473 (97.9%)   32,269 (86.1%) 5,204 (13.9%)  
  Yes 795 (2.1%)   454 (57.1%) 341 (42.9%)  
civil status at enrollment 0.002
  Divorced 716 (1.9%)   600 (83.8%) 116 (16.2%)  
  Legally Married 18,280 (47.8%)   15,630 (85.5%) 2,650 (14.5%)  
  Living w/Partner 501 (1.3%)   433 (86.4%) 68 (13.6%)  
  Never Married and Not Living w/Partner 4,098 (10.7%)   3,414 (83.3%) 684 (16.7%)  
  Separated 4,348 (11.4%)   3,659 (84.2%) 689 (15.8%)  
  Widowed 2,918 (7.6%)   2,445 (83.8%) 473 (16.2%)  
  Missing 7,407 (19.4%)   6,542 (88.3%) 865 (11.7%)  
patient transferred out < 0.0001
  No 36,344 (95.0%)   31,187 (85.8%) 5,157 (14.2%)  
  Yes 1,924 (5.0%)   1,536 (79.8%) 388 (20.2%)  
Height (cm) at enrollment 0.060
  Mean (SD) 164.5 (±8.9)   164.4 (±8.9) 164.7 (±8.9)  
  Median (IQR) 164.0 (158.0 - 170.0)   164.0 (158.0 - 170.0) 164.0 (158.5 - 170.5)  
  Missing 7,610 (19.9%)   6,497 (19.9%) 1,113 (20.1%)  
Weight (kg) at enrollment < 0.0001
  Mean (SD) 58.6 (±11.6)   59.0 (±11.6) 56.8 (±11.0)  
  Median (IQR) 57.0 (51.0 - 65.0)   57.7 (51.0 - 65.0) 55.5 (50.0 - 63.0)  
  Missing 1,550 (4.1%)   1,300 (4.0%) 250 (4.5%)  
BMI at enrollment < 0.0001
  Mean (SD) 21.8 (±4.2)   21.9 (±4.2) 20.9 (±3.9)  
  Median (IQR) 21.1 (18.9 - 23.8)   21.2 (19.1 - 23.9) 20.4 (18.3 - 22.9)  
  Missing 7,698 (20.1%)   6,566 (20.1%) 1,132 (20.4%)  
Second VL count < 0.0001
  Mean (SD) 14136.7 (±161008.3)   4297.9 (±88387.6) 69708.8 (±353005.0)  
  Median (IQR) 40.0 (40.0 - 283.0)   40.0 (40.0 - 128.0) 481.0 (40.0 - 19310.5)  
  Missing 12,187 (31.8%)   10,565 (32.3%) 1,622 (29.3%)  
Third VL count < 0.0001
  Mean (SD) 13619.4 (±843866.8)   2780.0 (±36129.8) 69173.1 (±2086307.2)  
  Median (IQR) 40.0 (40.0 - 197.0)   40.0 (40.0 - 112.0) 135.5 (40.0 - 2376.8)  
  Missing 20,456 (53.5%)   17,819 (54.5%) 2,637 (47.6%)  
‡

Socio-demographics | Viral Load Failure 2

Table 2: Socio-demographics
  Second Virologic Failure  
Total
No. 26,081
  No
No. 22,722
Yes
No. 3,359
  P-value
age at first exposure to ARV 0.068
  Mean (SD) 36.7 (±10.8)   36.7 (±10.8) 37.0 (±10.8)  
  Median (IQR) 35.1 (28.5 - 43.3)   35.1 (28.5 - 43.2) 35.5 (28.7 - 43.8)  
  Missing 332 (1.3%)   294 (1.3%) 38 (1.1%)  
male gender < 0.0001
  No 16,797 (64.4%)   14,745 (87.8%) 2,052 (12.2%)  
  Yes 9,284 (35.6%)   7,977 (85.9%) 1,307 (14.1%)  
death < 0.0001
  No 25,715 (98.6%)   22,505 (87.5%) 3,210 (12.5%)  
  Yes 366 (1.4%)   217 (59.3%) 149 (40.7%)  
civil status at enrollment 0.002
  Divorced 423 (1.6%)   352 (83.2%) 71 (16.8%)  
  Legally Married 13,138 (50.4%)   11,411 (86.9%) 1,727 (13.1%)  
  Living w/Partner 313 (1.2%)   277 (88.5%) 36 (11.5%)  
  Never Married and Not Living w/Partner 2,764 (10.6%)   2,338 (84.6%) 426 (15.4%)  
  Separated 2,978 (11.4%)   2,607 (87.5%) 371 (12.5%)  
  Widowed 2,218 (8.5%)   1,904 (85.8%) 314 (14.2%)  
  Missing 4,247 (16.3%)   3,833 (90.3%) 414 (9.7%)  
patient transferred out < 0.0001
  No 25,078 (96.2%)   21,900 (87.3%) 3,178 (12.7%)  
  Yes 1,003 (3.8%)   822 (82.0%) 181 (18.0%)  
Height (cm) at enrollment 0.009
  Mean (SD) 164.7 (±8.9)   164.7 (±8.9) 165.1 (±8.9)  
  Median (IQR) 164.0 (159.0 - 170.3)   164.0 (158.5 - 170.0) 165.0 (159.0 - 171.0)  
  Missing 5,383 (20.6%)   4,686 (20.6%) 697 (20.8%)  
Weight (kg) at enrollment < 0.0001
  Mean (SD) 58.9 (±11.6)   59.2 (±11.7) 57.2 (±10.9)  
  Median (IQR) 57.8 (51.0 - 65.0)   58.0 (51.0 - 65.0) 56.0 (50.0 - 63.0)  
  Missing 1,006 (3.9%)   859 (3.8%) 147 (4.4%)  
BMI at enrollment < 0.0001
  Mean (SD) 21.8 (±4.2)   21.9 (±4.2) 21.0 (±3.9)  
  Median (IQR) 21.1 (19.0 - 23.9)   21.2 (19.0 - 24.0) 20.4 (18.4 - 22.9)  
  Missing 5,439 (20.9%)   4,733 (20.8%) 706 (21.0%)  
First VL count < 0.0001
  Mean (SD) 17759.0 (±168420.6)   8511.1 (±128813.3) 80316.6 (±321771.5)  
  Median (IQR) 40.0 (40.0 - 400.0)   40.0 (40.0 - 213.8) 1222.0 (40.0 - 33766.5)  
Third VL count < 0.0001
  Mean (SD) 13619.4 (±843866.8)   2244.6 (±33820.5) 81018.8 (±2218370.9)  
  Median (IQR) 40.0 (40.0 - 197.0)   40.0 (40.0 - 100.0) 400.0 (40.0 - 9315.2)  
  Missing 8,269 (31.7%)   7,482 (32.9%) 787 (23.4%)  
‡

Socio-demographics | Viral Load Failure 3

Table 3: Socio-demographics
  Third Virologic Failure  
Total
No. 17,812
  No
No. 15,776
Yes
No. 2,036
  P-value
age at first exposure to ARV 0.69
  Mean (SD) 37.2 (±10.8)   37.2 (±10.8) 37.2 (±10.9)  
  Median (IQR) 35.8 (29.0 - 44.0)   35.8 (29.0 - 44.0) 35.8 (28.9 - 43.8)  
  Missing 166 (0.9%)   147 (0.9%) 19 (0.9%)  
male gender < 0.0001
  No 11,510 (64.6%)   10,308 (89.6%) 1,202 (10.4%)  
  Yes 6,302 (35.4%)   5,468 (86.8%) 834 (13.2%)  
death < 0.0001
  No 17,637 (99.0%)   15,669 (88.8%) 1,968 (11.2%)  
  Yes 175 (1.0%)   107 (61.1%) 68 (38.9%)  
civil status at enrollment 0.12
  Divorced 270 (1.5%)   237 (87.8%) 33 (12.2%)  
  Legally Married 9,568 (53.7%)   8,456 (88.4%) 1,112 (11.6%)  
  Living w/Partner 197 (1.1%)   176 (89.3%) 21 (10.7%)  
  Never Married and Not Living w/Partner 1,828 (10.3%)   1,578 (86.3%) 250 (13.7%)  
  Separated 2,025 (11.4%)   1,805 (89.1%) 220 (10.9%)  
  Widowed 1,694 (9.5%)   1,505 (88.8%) 189 (11.2%)  
  Missing 2,230 (12.5%)   2,019 (90.5%) 211 (9.5%)  
patient transferred out < 0.0001
  No 17,275 (97.0%)   15,334 (88.8%) 1,941 (11.2%)  
  Yes 537 (3.0%)   442 (82.3%) 95 (17.7%)  
Height (cm) at enrollment 0.050
  Mean (SD) 165.1 (±8.9)   165.0 (±8.9) 165.4 (±8.8)  
  Median (IQR) 165.0 (159.0 - 171.0)   165.0 (159.0 - 171.0) 165.0 (159.5 - 171.0)  
  Missing 3,863 (21.7%)   3,434 (21.8%) 429 (21.1%)  
Weight (kg) at enrollment < 0.0001
  Mean (SD) 59.3 (±11.8)   59.5 (±11.9) 57.2 (±10.7)  
  Median (IQR) 58.0 (51.0 - 65.0)   58.0 (51.0 - 66.0) 56.0 (50.0 - 63.0)  
  Missing 686 (3.9%)   589 (3.7%) 97 (4.8%)  
BMI at enrollment < 0.0001
  Mean (SD) 21.8 (±4.2)   21.9 (±4.3) 20.9 (±3.8)  
  Median (IQR) 21.1 (18.9 - 23.9)   21.2 (19.0 - 24.0) 20.3 (18.4 - 22.9)  
  Missing 3,901 (21.9%)   3,465 (22.0%) 436 (21.4%)  
First VL count < 0.0001
  Mean (SD) 17853.8 (±161750.7)   12629.9 (±145863.6) 58330.8 (±249418.1)  
  Median (IQR) 40.0 (40.0 - 400.0)   40.0 (40.0 - 316.0) 522.0 (40.0 - 14620.0)  
Second VL count < 0.0001
  Mean (SD) 14532.3 (±161359.8)   7872.0 (±115264.2) 66139.5 (±349122.0)  
  Median (IQR) 40.0 (40.0 - 380.2)   40.0 (40.0 - 192.0) 1367.5 (40.0 - 21434.8)  
‡

Socio-demographics | Program

Table 4: Socio-demographics
  Programs
Total
No. 86,738
  AMPATH
No. 42,756
FACES
No. 10,329
IDI
No. 2,244
KISESA
No. 1,306
MASAKA
No. 4,267
MBARARA
No. 2,963
MOROGORO
No. 1,785
RAKAI
No. 19,688
TUMBI
No. 1,400
age at first exposure to ARV
  Mean (SD) 35.1 (±10.9)   37.0 (±11.2) 32.4 (±9.8) 35.6 (±10.8) 35.2 (±11.0) 31.7 (±9.3) 31.7 (±9.7) 40.0 (±11.4) 32.5 (±9.9) 39.6 (±11.7)
  Median (IQR) 33.0 (26.9 - 41.3)   35.4 (28.6 - 43.8) 30.4 (25.3 - 37.2) 33.6 (27.7 - 42.0) 33.1 (27.4 - 40.6) 30.0 (24.7 - 37.1) 29.4 (24.5 - 36.2) 39.3 (31.6 - 47.1) 30.4 (25.0 - 37.9) 38.7 (30.7 - 46.0)
  Missing 11,592 (13.4%)   5,479 (12.8%) 1,666 (16.1%) 312 (13.9%) 78 (6.0%) 147 (3.4%) 123 (4.2%) 43 (2.4%) 3,679 (18.7%) 65 (4.6%)
male gender
  No 54,332 (62.6%)   27,028 (49.7%) 6,496 (12.0%) 1,316 (2.4%) 780 (1.4%) 2,673 (4.9%) 1,836 (3.4%) 1,097 (2.0%) 12,224 (22.5%) 882 (1.6%)
  Yes 32,406 (37.4%)   15,728 (48.5%) 3,833 (11.8%) 928 (2.9%) 526 (1.6%) 1,594 (4.9%) 1,127 (3.5%) 688 (2.1%) 7,464 (23.0%) 518 (1.6%)
death
  No 82,158 (94.7%)   39,877 (48.5%) 9,883 (12.0%) 2,012 (2.4%) 1,254 (1.5%) 4,140 (5.0%) 2,914 (3.5%) 1,662 (2.0%) 19,120 (23.3%) 1,296 (1.6%)
  Yes 4,580 (5.3%)   2,879 (62.9%) 446 (9.7%) 232 (5.1%) 52 (1.1%) 127 (2.8%) 49 (1.1%) 123 (2.7%) 568 (12.4%) 104 (2.3%)
civil status at enrollment
  Divorced 1,877 (2.2%)   422 (22.5%) 0 (0.0%) 8 (0.4%) 28 (1.5%) 837 (44.6%) 98 (5.2%) 141 (7.5%) 297 (15.8%) 46 (2.5%)
  Legally Married 37,068 (42.7%)   20,314 (54.8%) 6,091 (16.4%) 1,078 (2.9%) 808 (2.2%) 1,377 (3.7%) 1,650 (4.5%) 280 (0.8%) 5,242 (14.1%) 228 (0.6%)
  Living w/Partner 1,017 (1.2%)   591 (58.1%) 91 (8.9%) 173 (17.0%) 1 (0.1%) 0 (0.0%) 0 (0.0%) 2 (0.2%) 144 (14.2%) 15 (1.5%)
  Never Married and Not Living w/Partner 8,941 (10.3%)   5,596 (62.6%) 0 (0.0%) 405 (4.5%) 435 (4.9%) 348 (3.9%) 629 (7.0%) 69 (0.8%) 1,327 (14.8%) 132 (1.5%)
  Separated 10,224 (11.8%)   5,224 (51.1%) 2,414 (23.6%) 430 (4.2%) 0 (0.0%) 0 (0.0%) 466 (4.6%) 0 (0.0%) 1,690 (16.5%) 0 (0.0%)
  Widowed 5,453 (6.3%)   3,777 (69.3%) 803 (14.7%) 140 (2.6%) 32 (0.6%) 45 (0.8%) 118 (2.2%) 38 (0.7%) 463 (8.5%) 37 (0.7%)
  Missing 22,158 (25.5%)   6,832 (30.8%) 930 (4.2%) 10 (0.0%) 2 (0.0%) 1,660 (7.5%) 2 (0.0%) 1,255 (5.7%) 10,525 (47.5%) 942 (4.3%)
patient transferred out
  No 80,287 (92.6%)   39,477 (49.2%) 9,109 (11.3%) 2,055 (2.6%) 964 (1.2%) 3,681 (4.6%) 2,675 (3.3%) 1,661 (2.1%) 19,580 (24.4%) 1,085 (1.4%)
  Yes 6,451 (7.4%)   3,279 (50.8%) 1,220 (18.9%) 189 (2.9%) 342 (5.3%) 586 (9.1%) 288 (4.5%) 124 (1.9%) 108 (1.7%) 315 (4.9%)
Weight (kg) at enrollment
  Mean (SD) 57.8 (±11.3)   58.4 (±11.5) 59.7 (±10.9) 59.9 (±13.7) 56.0 (±10.2) 57.1 (±10.7) 60.0 (±12.0) 58.3 (±13.7) 54.9 (±9.4) 58.7 (±13.6)
  Median (IQR) 56.5 (50.0 - 64.0)   57.0 (50.0 - 65.0) 59.0 (52.0 - 65.0) 58.0 (50.1 - 67.0) 55.0 (50.0 - 61.0) 55.8 (50.0 - 63.0) 58.0 (51.0 - 66.0) 56.0 (49.0 - 65.0) 54.0 (49.0 - 60.0) 57.0 (50.0 - 66.0)
  Missing 6,309 (7.3%)   3,426 (8.0%) 131 (1.3%) 90 (4.0%) 2 (0.2%) 91 (2.1%) 89 (3.0%) 29 (1.6%) 2,388 (12.1%) 63 (4.5%)
BMI at enrollment
  Mean (SD) 21.5 (±4.1)   21.2 (±4.1) 21.4 (±3.8) 22.8 (±5.2) 20.8 (±3.7) 21.9 (±4.0) 23.1 (±4.6) 23.1 (±5.3) 21.4 (±3.6) 22.1 (±5.3)
  Median (IQR) 20.9 (18.7 - 23.5)   20.6 (18.5 - 23.2) 20.9 (18.9 - 23.3) 21.8 (19.3 - 25.3) 20.3 (18.4 - 22.7) 21.3 (19.2 - 23.8) 22.4 (20.0 - 25.5) 22.2 (19.6 - 25.6) 21.0 (19.1 - 23.2) 21.3 (18.5 - 24.7)
  Missing 19,876 (22.9%)   9,227 (21.6%) 158 (1.5%) 163 (7.3%) 2 (0.2%) 1,284 (30.1%) 438 (14.8%) 33 (1.8%) 8,506 (43.2%) 65 (4.6%)
‡

Clinical Profile

Patient timeline

Clinical Profile Prior to ART Initiation | Viral Load Failure 1

Plot the explanatory variable distribution for both the variables to understand the variability uniquely explained (The non-intersecting part of the blue and the red is the variation explained by the variable)

## [1] "cd4"

## [1] "hgb"

## [1] "weight"

## [1] "BMI"

## [1] "numARVs"

Table 6: General Clinical Profile Prior to ART Initiation | Viral Load Failure 1
  First Virologic Failure  
Total
No. 38,268
  No
No. 32,723
Yes
No. 5,545
  P-value
weight < 0.0001
  Mean (SD) 58.7 (±11.6)   59.0 (±11.6) 56.8 (±11.0)  
  Median (IQR) 57.0 (51.0 - 65.0)   58.0 (51.0 - 65.0) 55.5 (50.0 - 63.0)  
  Missing 2,733 (7.1%)   2,297 (7.0%) 436 (7.9%)  
Weight Loss < 0.0001
  No 35,822 (93.6%)   30,824 (86.0%) 4,998 (14.0%)  
  Yes 2,446 (6.4%)   1,899 (77.6%) 547 (22.4%)  
BMI < 0.0001
  Mean (SD) 21.8 (±4.2)   21.9 (±4.2) 21.0 (±3.9)  
  Median (IQR) 21.1 (19.0 - 23.8)   21.2 (19.1 - 23.9) 20.4 (18.3 - 22.9)  
  Missing 8,721 (22.8%)   7,464 (22.8%) 1,257 (22.7%)  
hemoglobin < 0.0001
  Mean (SD) 12.3 (±2.7)   12.4 (±2.7) 11.8 (±2.4)  
  Median (IQR) 12.5 (10.8 - 14.0)   12.5 (10.8 - 14.0) 11.9 (10.1 - 13.4)  
  Missing 32,862 (85.9%)   27,979 (85.5%) 4,883 (88.1%)  
CD4 < 0.0001
  Mean (SD) 353.5 (±266.9)   366.5 (±268.6) 267.7 (±238.4)  
  Median (IQR) 313.0 (150.0 - 492.0)   327.0 (165.0 - 503.0) 202.0 (79.6 - 396.1)  
  Missing 19,173 (50.1%)   16,139 (49.3%) 3,034 (54.7%)  
Cough < 0.0001
  No 35,996 (94.1%)   30,863 (85.7%) 5,133 (14.3%)  
  Yes 2,272 (5.9%)   1,860 (81.9%) 412 (18.1%)  
Night Sweats < 0.0001
  No 37,376 (97.7%)   32,027 (85.7%) 5,349 (14.3%)  
  Yes 892 (2.3%)   696 (78.0%) 196 (22.0%)  
WHO stage < 0.0001
  1 16,271 (42.5%)   14,449 (88.8%) 1,822 (11.2%)  
  4 1,056 (2.8%)   853 (80.8%) 203 (19.2%)  
  2 6,651 (17.4%)   5,720 (86.0%) 931 (14.0%)  
  3 4,503 (11.8%)   3,648 (81.0%) 855 (19.0%)  
  Missing 9,787 (25.6%)   8,053 (82.3%) 1,734 (17.7%)  
Staging: Symptomatic HIV-associated Nephropathy/Cardiomyopathy 1.0
  No 38,261 (100.0%)   32,717 (85.5%) 5,544 (14.5%)  
  Yes 7 (0.0%)   6 (85.7%) 1 (14.3%)  
TB sign: none < 0.0001
  No 19,281 (50.4%)   17,014 (88.2%) 2,267 (11.8%)  
  Yes 18,987 (49.6%)   15,709 (82.7%) 3,278 (17.3%)  
TB sign: cough < 0.0001
  No 37,093 (96.9%)   31,836 (85.8%) 5,257 (14.2%)  
  Yes 1,175 (3.1%)   887 (75.5%) 288 (24.5%)  
TB sign: weight loss 0.013
  No 37,910 (99.1%)   32,434 (85.6%) 5,476 (14.4%)  
  Yes 358 (0.9%)   289 (80.7%) 69 (19.3%)  
‡
Table 7: Clinical Diagnosis Profile Prior to ART Initiation | Viral Load Failure 1
  First Virologic Failure  
Total
No. 38,268
  No
No. 32,723
Yes
No. 5,545
  P-value
Diagnosis: recurrent severe bacterial pneumonia 1.00
  No 38,267 (100.0%)   32,722 (85.5%) 5,545 (14.5%)  
  Yes 1 (0.0%)   1 (100.0%) 0 (0.0%)  
Diagnosis: Recurrent Septicemia including non-typhoidal Salmonella 1.0
  No 38,268 (100.0%)   32,723 (85.5%) 5,545 (14.5%)  
  Yes 0 (0.0%)   0 (%) 0 (%)  
Diagnosis: HIV Wasting Syndrome 0.0008
  No 38,245 (99.9%)   32,710 (85.5%) 5,535 (14.5%)  
  Yes 23 (0.1%)   13 (56.5%) 10 (43.5%)  
Diagnosis: Toxoplasmosis, CNS 0.71
  No 38,207 (99.8%)   32,672 (85.5%) 5,535 (14.5%)  
  Yes 61 (0.2%)   51 (83.6%) 10 (16.4%)  
Diagnosis: Extrapulmonary TB 0.19
  No 38,226 (99.9%)   32,690 (85.5%) 5,536 (14.5%)  
  Yes 42 (0.1%)   33 (78.6%) 9 (21.4%)  
Diagnosis: Pulmonary TB 0.001
  No 37,596 (98.2%)   32,179 (85.6%) 5,417 (14.4%)  
  Yes 672 (1.8%)   544 (81.0%) 128 (19.0%)  
Diagnosis: Lymphoma (cerebral or B-cell non-Hodgkin) 0.37
  No 38,265 (100.0%)   32,721 (85.5%) 5,544 (14.5%)  
  Yes 3 (0.0%)   2 (66.7%) 1 (33.3%)  
Diagnosis: Kaposi’s Sarcoma 0.0005
  No 38,168 (99.7%)   32,651 (85.5%) 5,517 (14.5%)  
  Yes 100 (0.3%)   72 (72.0%) 28 (28.0%)  
Diagnosis: Cervical Cancer 1.0
  No 38,266 (100.0%)   32,721 (85.5%) 5,545 (14.5%)  
  Yes 2 (0.0%)   2 (100.0%) 0 (0.0%)  
Diagnosis: Extrapulmonary Cryptococcosis/Meningitis 0.029
  No 38,128 (99.6%)   32,613 (85.5%) 5,515 (14.5%)  
  Yes 140 (0.4%)   110 (78.6%) 30 (21.4%)  
Diagnosis: Cryptosporidiosis 0.21
  No 38,262 (100.0%)   32,719 (85.5%) 5,543 (14.5%)  
  Yes 6 (0.0%)   4 (66.7%) 2 (33.3%)  
Diagnosis: Cytomegalovirus Disease 0.14
  No 38,267 (100.0%)   32,723 (85.5%) 5,544 (14.5%)  
  Yes 1 (0.0%)   0 (0.0%) 1 (100.0%)  
Diagnosis: HIV Encephalopathy 0.097
  No 38,260 (100.0%)   32,718 (85.5%) 5,542 (14.5%)  
  Yes 8 (0.0%)   5 (62.5%) 3 (37.5%)  
Diagnosis: Candidiasis (Oesophageal, Bronchi, Trachea, or Lungs) 0.37
  No 38,103 (99.6%)   32,586 (85.5%) 5,517 (14.5%)  
  Yes 165 (0.4%)   137 (83.0%) 28 (17.0%)  
Diagnosis: Chronic Herpes Simplex 1.0
  No 38,252 (100.0%)   32,709 (85.5%) 5,543 (14.5%)  
  Yes 16 (0.0%)   14 (87.5%) 2 (12.5%)  
Diagnosis: Pneumocystis Pneumonia 0.15
  No 38,244 (99.9%)   32,705 (85.5%) 5,539 (14.5%)  
  Yes 24 (0.1%)   18 (75.0%) 6 (25.0%)  
Diagnosis: Progressive Multifocal Leukoencephalopathy 0.37
  No 38,265 (100.0%)   32,721 (85.5%) 5,544 (14.5%)  
  Yes 3 (0.0%)   2 (66.7%) 1 (33.3%)  
‡
Table 8: Prophylaxis Profile Prior to ART Initiation | Viral Load Failure 1
  First Virologic Failure  
Total
No. 38,268
  No
No. 32,723
Yes
No. 5,545
  P-value
anti-TB med: Rifabutin 1.0
  No 38,265 (100.0%)   32,720 (85.5%) 5,545 (14.5%)  
  Yes 3 (0.0%)   3 (100.0%) 0 (0.0%)  
anti-TB med: Rifafour(RHZE) < 0.0001
  No 37,346 (97.6%)   31,999 (85.7%) 5,347 (14.3%)  
  Yes 922 (2.4%)   724 (78.5%) 198 (21.5%)  
anti-TB med: Rifampicin(R) 0.091
  No 38,036 (99.4%)   32,534 (85.5%) 5,502 (14.5%)  
  Yes 232 (0.6%)   189 (81.5%) 43 (18.5%)  
anti-TB med: Rifater(RHZ) 0.045
  No 38,258 (100.0%)   32,717 (85.5%) 5,541 (14.5%)  
  Yes 10 (0.0%)   6 (60.0%) 4 (40.0%)  
anti-TB med: Rifinah(RH) 0.0003
  No 38,131 (99.6%)   32,622 (85.6%) 5,509 (14.4%)  
  Yes 137 (0.4%)   101 (73.7%) 36 (26.3%)  
anti-TB med: Streptomycin 0.12
  No 38,246 (99.9%)   32,707 (85.5%) 5,539 (14.5%)  
  Yes 22 (0.1%)   16 (72.7%) 6 (27.3%)  
anti-TB med: 3-FDC(RHE) 0.42
  No 38,255 (100.0%)   32,713 (85.5%) 5,542 (14.5%)  
  Yes 13 (0.0%)   10 (76.9%) 3 (23.1%)  
anti-TB med: Ethambutol(E) 0.27
  No 38,261 (100.0%)   32,718 (85.5%) 5,543 (14.5%)  
  Yes 7 (0.0%)   5 (71.4%) 2 (28.6%)  
anti-TB med: Ethambutol(E) 0.11
  No 38,040 (99.4%)   32,537 (85.5%) 5,503 (14.5%)  
  Yes 228 (0.6%)   186 (81.6%) 42 (18.4%)  
anti-TB med: INH 1.0
  No 38,227 (99.9%)   32,688 (85.5%) 5,539 (14.5%)  
  Yes 41 (0.1%)   35 (85.4%) 6 (14.6%)  
anti-TB med: Other 1.00
  No 38,267 (100.0%)   32,722 (85.5%) 5,545 (14.5%)  
  Yes 1 (0.0%)   1 (100.0%) 0 (0.0%)  
anti-TB med: Pyrazinamide(Z) 0.11
  No 38,038 (99.4%)   32,535 (85.5%) 5,503 (14.5%)  
  Yes 230 (0.6%)   188 (81.7%) 42 (18.3%)  
TB Prophylaxis: INH 0.67
  No 36,568 (95.6%)   31,263 (85.5%) 5,305 (14.5%)  
  Yes 1,700 (4.4%)   1,460 (85.9%) 240 (14.1%)  
OI Prophylaxis < 0.0001
  No 9,966 (26.0%)   8,937 (89.7%) 1,029 (10.3%)  
  Yes 28,302 (74.0%)   23,786 (84.0%) 4,516 (16.0%)  
TB treatment 0.012
  No 37,191 (97.2%)   31,831 (85.6%) 5,360 (14.4%)  
  Yes 1,077 (2.8%)   892 (82.8%) 185 (17.2%)  
‡
Table 9: ARVs Profile Prior to ART Initiation | Viral Load Failure 1
  First Virologic Failure  
Total
No. 38,268
  No
No. 32,723
Yes
No. 5,545
  P-value
# current ARVs < 0.0001
  Mean (SD) 3.0 (±0.2)   3.0 (±0.2) 3.0 (±0.3)  
  Median (IQR) 3.0 (3.0 - 3.0)   3.0 (3.0 - 3.0) 3.0 (3.0 - 3.0)  
  Missing 3,057 (8.0%)   2,460 (7.5%) 597 (10.8%)  
ARVs taken last 7 days 0.21
  about half 0 (0.0%)   0 (%) 0 (%)  
  all 1,515 (4.0%)   1,255 (82.8%) 260 (17.2%)  
  most 3 (0.0%)   2 (66.7%) 1 (33.3%)  
  none 94 (0.2%)   78 (83.0%) 16 (17.0%)  
  very few 1 (0.0%)   0 (0.0%) 1 (100.0%)  
  Missing 36,655 (95.8%)   31,388 (85.6%) 5,267 (14.4%)  
ART adherence: percent taken since last visit 0.14
  Mean (SD) 98.9 (±8.4)   99.5 (±4.1) 95.5 (±18.7)  
  Median (IQR) 100.0 (100.0 - 100.0)   100.0 (100.0 - 100.0) 100.0 (100.0 - 100.0)  
  Missing 37,871 (99.0%)   32,389 (99.0%) 5,482 (98.9%)  
ARV Adherence- combines formats from both the old and the new CTC 2 1.0
  Good: fewer than 2 missed days 322 (0.8%)   289 (89.8%) 33 (10.2%)  
  Poor: 2 or more missed days 4 (0.0%)   4 (100.0%) 0 (0.0%)  
  Missing 37,942 (99.1%)   32,430 (85.5%) 5,512 (14.5%)  
ARV adherence since last visit < 0.0001
  FAIR (85-94%) 63 (0.2%)   44 (69.8%) 19 (30.2%)  
  GOOD (>, 95%) 5,953 (15.6%)   5,091 (85.5%) 862 (14.5%)  
  POOR (< 85%) 86 (0.2%)   53 (61.6%) 33 (38.4%)  
  Missing 32,166 (84.1%)   27,535 (85.6%) 4,631 (14.4%)  
‡

Clinical Profile Prior to ART Initiation | Viral Load Failure 2

Table 10: Clinical Profile Prior to ART Initiation | Viral Load Failure 2
  Second Virologic Failure  
Total
No. 26,081
  No
No. 22,722
Yes
No. 3,359
  P-value
weight < 0.0001
  Mean (SD) 59.0 (±11.6)   59.2 (±11.7) 57.2 (±10.9)  
  Median (IQR) 58.0 (51.0 - 65.0)   58.0 (51.0 - 65.0) 56.0 (50.0 - 63.0)  
  Missing 1,576 (6.0%)   1,390 (6.1%) 186 (5.5%)  
Weight Loss < 0.0001
  No 24,064 (92.3%)   21,084 (87.6%) 2,980 (12.4%)  
  Yes 2,017 (7.7%)   1,638 (81.2%) 379 (18.8%)  
BMI < 0.0001
  Mean (SD) 21.8 (±4.2)   22.0 (±4.2) 21.1 (±3.9)  
  Median (IQR) 21.2 (19.0 - 23.9)   21.3 (19.1 - 24.0) 20.5 (18.4 - 22.9)  
  Missing 5,894 (22.6%)   5,157 (22.7%) 737 (21.9%)  
hemoglobin < 0.0001
  Mean (SD) 12.3 (±2.7)   12.3 (±2.7) 11.7 (±2.4)  
  Median (IQR) 12.4 (10.7 - 13.9)   12.5 (10.8 - 14.0) 11.8 (10.1 - 13.3)  
  Missing 22,721 (87.1%)   19,711 (86.7%) 3,010 (89.6%)  
CD4 < 0.0001
  Mean (SD) 349.5 (±267.0)   362.9 (±269.0) 249.3 (±228.0)  
  Median (IQR) 307.0 (147.1 - 487.0)   322.0 (162.6 - 498.5) 184.0 (73.3 - 363.0)  
  Missing 12,603 (48.3%)   10,843 (47.7%) 1,760 (52.4%)  
Cough < 0.0001
  No 24,345 (93.3%)   21,298 (87.5%) 3,047 (12.5%)  
  Yes 1,736 (6.7%)   1,424 (82.0%) 312 (18.0%)  
Night Sweats < 0.0001
  No 25,351 (97.2%)   22,142 (87.3%) 3,209 (12.7%)  
  Yes 730 (2.8%)   580 (79.5%) 150 (20.5%)  
WHO stage < 0.0001
  1 11,195 (42.9%)   10,083 (90.1%) 1,112 (9.9%)  
  4 688 (2.6%)   566 (82.3%) 122 (17.7%)  
  2 4,328 (16.6%)   3,746 (86.6%) 582 (13.4%)  
  3 3,209 (12.3%)   2,670 (83.2%) 539 (16.8%)  
  Missing 6,661 (25.5%)   5,657 (84.9%) 1,004 (15.1%)  
Staging: Symptomatic HIV-associated Nephropathy/Cardiomyopathy 0.50
  No 26,076 (100.0%)   22,718 (87.1%) 3,358 (12.9%)  
  Yes 5 (0.0%)   4 (80.0%) 1 (20.0%)  
TB sign: none < 0.0001
  No 11,736 (45.0%)   10,572 (90.1%) 1,164 (9.9%)  
  Yes 14,345 (55.0%)   12,150 (84.7%) 2,195 (15.3%)  
TB sign: cough 0.0001
  No 25,226 (96.7%)   22,015 (87.3%) 3,211 (12.7%)  
  Yes 855 (3.3%)   707 (82.7%) 148 (17.3%)  
TB sign: weight loss 0.51
  No 25,822 (99.0%)   22,500 (87.1%) 3,322 (12.9%)  
  Yes 259 (1.0%)   222 (85.7%) 37 (14.3%)  
Diagnosis: recurrent severe bacterial pneumonia 1.0
  No 26,080 (100.0%)   22,721 (87.1%) 3,359 (12.9%)  
  Yes 1 (0.0%)   1 (100.0%) 0 (0.0%)  
Diagnosis: Recurrent Septicemia including non-typhoidal Salmonella 1.0
  No 26,081 (100.0%)   22,722 (87.1%) 3,359 (12.9%)  
  Yes 0 (0.0%)   0 (%) 0 (%)  
Diagnosis: HIV Wasting Syndrome 0.66
  No 26,069 (100.0%)   22,712 (87.1%) 3,357 (12.9%)  
  Yes 12 (0.0%)   10 (83.3%) 2 (16.7%)  
Diagnosis: Toxoplasmosis, CNS 0.070
  No 26,055 (99.9%)   22,703 (87.1%) 3,352 (12.9%)  
  Yes 26 (0.1%)   19 (73.1%) 7 (26.9%)  
Diagnosis: Extrapulmonary TB 0.098
  No 26,051 (99.9%)   22,699 (87.1%) 3,352 (12.9%)  
  Yes 30 (0.1%)   23 (76.7%) 7 (23.3%)  
Diagnosis: Pulmonary TB 0.015
  No 25,634 (98.3%)   22,350 (87.2%) 3,284 (12.8%)  
  Yes 447 (1.7%)   372 (83.2%) 75 (16.8%)  
Diagnosis: Lymphoma (cerebral or B-cell non-Hodgkin) 1.00
  No 26,079 (100.0%)   22,720 (87.1%) 3,359 (12.9%)  
  Yes 2 (0.0%)   2 (100.0%) 0 (0.0%)  
Diagnosis: Kaposi’s Sarcoma 0.20
  No 26,015 (99.7%)   22,668 (87.1%) 3,347 (12.9%)  
  Yes 66 (0.3%)   54 (81.8%) 12 (18.2%)  
Diagnosis: Cervical Cancer 1.0
  No 26,081 (100.0%)   22,722 (87.1%) 3,359 (12.9%)  
  Yes 0 (0.0%)   0 (%) 0 (%)  
Diagnosis: Extrapulmonary Cryptococcosis/Meningitis 0.014
  No 26,007 (99.7%)   22,665 (87.1%) 3,342 (12.9%)  
  Yes 74 (0.3%)   57 (77.0%) 17 (23.0%)  
Diagnosis: Cryptosporidiosis 1.0
  No 26,081 (100.0%)   22,722 (87.1%) 3,359 (12.9%)  
  Yes 0 (0.0%)   0 (%) 0 (%)  
Diagnosis: Cytomegalovirus Disease 1.0
  No 26,080 (100.0%)   22,721 (87.1%) 3,359 (12.9%)  
  Yes 1 (0.0%)   1 (100.0%) 0 (0.0%)  
Diagnosis: HIV Encephalopathy 1.0
  No 26,077 (100.0%)   22,718 (87.1%) 3,359 (12.9%)  
  Yes 4 (0.0%)   4 (100.0%) 0 (0.0%)  
Diagnosis: Candidiasis (Oesophageal, Bronchi, Trachea, or Lungs) 0.88
  No 25,981 (99.6%)   22,634 (87.1%) 3,347 (12.9%)  
  Yes 100 (0.4%)   88 (88.0%) 12 (12.0%)  
Diagnosis: Chronic Herpes Simplex 0.075
  No 26,068 (100.0%)   22,713 (87.1%) 3,355 (12.9%)  
  Yes 13 (0.0%)   9 (69.2%) 4 (30.8%)  
Diagnosis: Pneumocystis Pneumonia 1.0
  No 26,063 (99.9%)   22,706 (87.1%) 3,357 (12.9%)  
  Yes 18 (0.1%)   16 (88.9%) 2 (11.1%)  
Diagnosis: Progressive Multifocal Leukoencephalopathy 0.24
  No 26,079 (100.0%)   22,721 (87.1%) 3,358 (12.9%)  
  Yes 2 (0.0%)   1 (50.0%) 1 (50.0%)  
anti-TB med: Rifabutin 1.00
  No 26,079 (100.0%)   22,720 (87.1%) 3,359 (12.9%)  
  Yes 2 (0.0%)   2 (100.0%) 0 (0.0%)  
anti-TB med: Rifafour(RHZE) < 0.0001
  No 25,312 (97.1%)   22,098 (87.3%) 3,214 (12.7%)  
  Yes 769 (2.9%)   624 (81.1%) 145 (18.9%)  
anti-TB med: Rifampicin(R) 0.32
  No 25,970 (99.6%)   22,629 (87.1%) 3,341 (12.9%)  
  Yes 111 (0.4%)   93 (83.8%) 18 (16.2%)  
anti-TB med: Rifater(RHZ) 1.0
  No 26,073 (100.0%)   22,715 (87.1%) 3,358 (12.9%)  
  Yes 8 (0.0%)   7 (87.5%) 1 (12.5%)  
anti-TB med: Rifinah(RH) 0.18
  No 25,983 (99.6%)   22,641 (87.1%) 3,342 (12.9%)  
  Yes 98 (0.4%)   81 (82.7%) 17 (17.3%)  
anti-TB med: Streptomycin 1.0
  No 26,063 (99.9%)   22,706 (87.1%) 3,357 (12.9%)  
  Yes 18 (0.1%)   16 (88.9%) 2 (11.1%)  
anti-TB med: 3-FDC(RHE) 0.043
  No 26,070 (100.0%)   22,715 (87.1%) 3,355 (12.9%)  
  Yes 11 (0.0%)   7 (63.6%) 4 (36.4%)  
anti-TB med: Ethambutol(E) 1.0
  No 26,075 (100.0%)   22,716 (87.1%) 3,359 (12.9%)  
  Yes 6 (0.0%)   6 (100.0%) 0 (0.0%)  
anti-TB med: Ethambutol(E) 0.26
  No 25,971 (99.6%)   22,630 (87.1%) 3,341 (12.9%)  
  Yes 110 (0.4%)   92 (83.6%) 18 (16.4%)  
anti-TB med: INH 0.17
  No 26,051 (99.9%)   22,693 (87.1%) 3,358 (12.9%)  
  Yes 30 (0.1%)   29 (96.7%) 1 (3.3%)  
anti-TB med: Other 1.0
  No 26,080 (100.0%)   22,721 (87.1%) 3,359 (12.9%)  
  Yes 1 (0.0%)   1 (100.0%) 0 (0.0%)  
anti-TB med: Pyrazinamide(Z) 0.32
  No 25,969 (99.6%)   22,628 (87.1%) 3,341 (12.9%)  
  Yes 112 (0.4%)   94 (83.9%) 18 (16.1%)  
TB Prophylaxis: INH 0.75
  No 24,930 (95.6%)   21,715 (87.1%) 3,215 (12.9%)  
  Yes 1,151 (4.4%)   1,007 (87.5%) 144 (12.5%)  
OI Prophylaxis < 0.0001
  No 6,044 (23.2%)   5,573 (92.2%) 471 (7.8%)  
  Yes 20,037 (76.8%)   17,149 (85.6%) 2,888 (14.4%)  
TB treatment 0.040
  No 25,335 (97.1%)   22,091 (87.2%) 3,244 (12.8%)  
  Yes 746 (2.9%)   631 (84.6%) 115 (15.4%)  
# current ARVs 0.96
  Mean (SD) 3.0 (±0.2)   3.0 (±0.2) 3.0 (±0.3)  
  Median (IQR) 3.0 (3.0 - 3.0)   3.0 (3.0 - 3.0) 3.0 (3.0 - 3.0)  
  Missing 2,236 (8.6%)   1,894 (8.3%) 342 (10.2%)  
ARVs taken last 7 days 1.0
  about half 0 (0.0%)   0 (%) 0 (%)  
  all 1,333 (5.1%)   1,094 (82.1%) 239 (17.9%)  
  most 2 (0.0%)   2 (100.0%) 0 (0.0%)  
  none 77 (0.3%)   63 (81.8%) 14 (18.2%)  
  very few 1 (0.0%)   1 (100.0%) 0 (0.0%)  
  Missing 24,668 (94.6%)   21,562 (87.4%) 3,106 (12.6%)  
ART adherence: percent taken since last visit 0.64
  Mean (SD) 98.8 (±9.0)   99.0 (±8.9) 98.0 (±10.0)  
  Median (IQR) 100.0 (100.0 - 100.0)   100.0 (100.0 - 100.0) 100.0 (100.0 - 100.0)  
  Missing 25,923 (99.4%)   22,589 (99.4%) 3,334 (99.3%)  
ARV Adherence- combines formats from both the old and the new CTC 2 1.0
  Good: fewer than 2 missed days 161 (0.6%)   152 (94.4%) 9 (5.6%)  
  Poor: 2 or more missed days 1 (0.0%)   1 (100.0%) 0 (0.0%)  
  Missing 25,919 (99.4%)   22,569 (87.1%) 3,350 (12.9%)  
ARV adherence since last visit 0.0003
  FAIR (85-94%) 42 (0.2%)   27 (64.3%) 15 (35.7%)  
  GOOD (>, 95%) 4,354 (16.7%)   3,798 (87.2%) 556 (12.8%)  
  POOR (< 85%) 56 (0.2%)   47 (83.9%) 9 (16.1%)  
  Missing 21,629 (82.9%)   18,850 (87.2%) 2,779 (12.8%)  
‡

Clinical Profile Prior to ART Initiation | Viral Load Failure 3

Table 11: Clinical Profile Prior to ART Initiation | Viral Load Failure 3
  Third Virologic Failure  
Total
No. 17,812
  No
No. 15,776
Yes
No. 2,036
  P-value
weight < 0.0001
  Mean (SD) 59.3 (±11.7)   59.5 (±11.8) 57.3 (±10.7)  
  Median (IQR) 58.0 (51.0 - 65.0)   58.0 (51.0 - 66.0) 56.0 (50.0 - 63.5)  
  Missing 884 (5.0%)   779 (4.9%) 105 (5.2%)  
Weight Loss < 0.0001
  No 16,082 (90.3%)   14,342 (89.2%) 1,740 (10.8%)  
  Yes 1,730 (9.7%)   1,434 (82.9%) 296 (17.1%)  
BMI < 0.0001
  Mean (SD) 21.9 (±4.2)   22.0 (±4.3) 21.0 (±3.8)  
  Median (IQR) 21.2 (19.0 - 23.9)   21.3 (19.0 - 24.0) 20.4 (18.4 - 23.0)  
  Missing 4,011 (22.5%)   3,570 (22.6%) 441 (21.7%)  
hemoglobin 0.0005
  Mean (SD) 12.1 (±2.7)   12.2 (±2.7) 11.4 (±2.5)  
  Median (IQR) 12.3 (10.5 - 13.8)   12.3 (10.6 - 13.8) 11.3 (9.9 - 13.1)  
  Missing 15,726 (88.3%)   13,846 (87.8%) 1,880 (92.3%)  
CD4 < 0.0001
  Mean (SD) 339.5 (±264.9)   350.4 (±267.9) 241.5 (±213.6)  
  Median (IQR) 295.0 (140.6 - 476.0)   309.0 (151.0 - 487.0) 175.0 (78.1 - 349.6)  
  Missing 8,167 (45.9%)   7,097 (45.0%) 1,070 (52.6%)  
Cough < 0.0001
  No 16,468 (92.5%)   14,651 (89.0%) 1,817 (11.0%)  
  Yes 1,344 (7.5%)   1,125 (83.7%) 219 (16.3%)  
Night Sweats < 0.0001
  No 17,222 (96.7%)   15,300 (88.8%) 1,922 (11.2%)  
  Yes 590 (3.3%)   476 (80.7%) 114 (19.3%)  
WHO stage < 0.0001
  1 7,617 (42.8%)   6,932 (91.0%) 685 (9.0%)  
  4 466 (2.6%)   390 (83.7%) 76 (16.3%)  
  2 2,956 (16.6%)   2,616 (88.5%) 340 (11.5%)  
  3 2,296 (12.9%)   1,925 (83.8%) 371 (16.2%)  
  Missing 4,477 (25.1%)   3,913 (87.4%) 564 (12.6%)  
Staging: Symptomatic HIV-associated Nephropathy/Cardiomyopathy 1.0
  No 17,810 (100.0%)   15,774 (88.6%) 2,036 (11.4%)  
  Yes 2 (0.0%)   2 (100.0%) 0 (0.0%)  
TB sign: none < 0.0001
  No 6,997 (39.3%)   6,358 (90.9%) 639 (9.1%)  
  Yes 10,815 (60.7%)   9,418 (87.1%) 1,397 (12.9%)  
TB sign: cough < 0.0001
  No 17,211 (96.6%)   15,276 (88.8%) 1,935 (11.2%)  
  Yes 601 (3.4%)   500 (83.2%) 101 (16.8%)  
TB sign: weight loss 0.026
  No 17,629 (99.0%)   15,624 (88.6%) 2,005 (11.4%)  
  Yes 183 (1.0%)   152 (83.1%) 31 (16.9%)  
Diagnosis: recurrent severe bacterial pneumonia 0.11
  No 17,811 (100.0%)   15,776 (88.6%) 2,035 (11.4%)  
  Yes 1 (0.0%)   0 (0.0%) 1 (100.0%)  
Diagnosis: Recurrent Septicemia including non-typhoidal Salmonella 1.0
  No 17,812 (100.0%)   15,776 (88.6%) 2,036 (11.4%)  
  Yes 0 (0.0%)   0 (%) 0 (%)  
Diagnosis: HIV Wasting Syndrome 1.0
  No 17,803 (99.9%)   15,768 (88.6%) 2,035 (11.4%)  
  Yes 9 (0.1%)   8 (88.9%) 1 (11.1%)  
Diagnosis: Toxoplasmosis, CNS 0.69
  No 17,797 (99.9%)   15,763 (88.6%) 2,034 (11.4%)  
  Yes 15 (0.1%)   13 (86.7%) 2 (13.3%)  
Diagnosis: Extrapulmonary TB 1.0
  No 17,789 (99.9%)   15,755 (88.6%) 2,034 (11.4%)  
  Yes 23 (0.1%)   21 (91.3%) 2 (8.7%)  
Diagnosis: Pulmonary TB 0.0003
  No 17,489 (98.2%)   15,512 (88.7%) 1,977 (11.3%)  
  Yes 323 (1.8%)   264 (81.7%) 59 (18.3%)  
Diagnosis: Lymphoma (cerebral or B-cell non-Hodgkin) 1.0
  No 17,810 (100.0%)   15,774 (88.6%) 2,036 (11.4%)  
  Yes 2 (0.0%)   2 (100.0%) 0 (0.0%)  
Diagnosis: Kaposi’s Sarcoma 0.032
  No 17,767 (99.7%)   15,741 (88.6%) 2,026 (11.4%)  
  Yes 45 (0.3%)   35 (77.8%) 10 (22.2%)  
Diagnosis: Cervical Cancer 1.0
  No 17,812 (100.0%)   15,776 (88.6%) 2,036 (11.4%)  
  Yes 0 (0.0%)   0 (%) 0 (%)  
Diagnosis: Extrapulmonary Cryptococcosis/Meningitis 0.007
  No 17,775 (99.8%)   15,749 (88.6%) 2,026 (11.4%)  
  Yes 37 (0.2%)   27 (73.0%) 10 (27.0%)  
Diagnosis: Cryptosporidiosis 1.0
  No 17,812 (100.0%)   15,776 (88.6%) 2,036 (11.4%)  
  Yes 0 (0.0%)   0 (%) 0 (%)  
Diagnosis: Cytomegalovirus Disease 1.0
  No 17,812 (100.0%)   15,776 (88.6%) 2,036 (11.4%)  
  Yes 0 (0.0%)   0 (%) 0 (%)  
Diagnosis: HIV Encephalopathy 1.0
  No 17,809 (100.0%)   15,773 (88.6%) 2,036 (11.4%)  
  Yes 3 (0.0%)   3 (100.0%) 0 (0.0%)  
Diagnosis: Candidiasis (Oesophageal, Bronchi, Trachea, or Lungs) 1.00
  No 17,752 (99.7%)   15,722 (88.6%) 2,030 (11.4%)  
  Yes 60 (0.3%)   54 (90.0%) 6 (10.0%)  
Diagnosis: Chronic Herpes Simplex 0.36
  No 17,801 (99.9%)   15,767 (88.6%) 2,034 (11.4%)  
  Yes 11 (0.1%)   9 (81.8%) 2 (18.2%)  
Diagnosis: Pneumocystis Pneumonia 1.0
  No 17,796 (99.9%)   15,761 (88.6%) 2,035 (11.4%)  
  Yes 16 (0.1%)   15 (93.8%) 1 (6.2%)  
Diagnosis: Progressive Multifocal Leukoencephalopathy 1.0
  No 17,811 (100.0%)   15,775 (88.6%) 2,036 (11.4%)  
  Yes 1 (0.0%)   1 (100.0%) 0 (0.0%)  
anti-TB med: Rifabutin 1.0
  No 17,810 (100.0%)   15,774 (88.6%) 2,036 (11.4%)  
  Yes 2 (0.0%)   2 (100.0%) 0 (0.0%)  
anti-TB med: Rifafour(RHZE) 0.0001
  No 17,154 (96.3%)   15,226 (88.8%) 1,928 (11.2%)  
  Yes 658 (3.7%)   550 (83.6%) 108 (16.4%)  
anti-TB med: Rifampicin(R) 0.18
  No 17,761 (99.7%)   15,734 (88.6%) 2,027 (11.4%)  
  Yes 51 (0.3%)   42 (82.4%) 9 (17.6%)  
anti-TB med: Rifater(RHZ) 0.19
  No 17,805 (100.0%)   15,771 (88.6%) 2,034 (11.4%)  
  Yes 7 (0.0%)   5 (71.4%) 2 (28.6%)  
anti-TB med: Rifinah(RH) 0.86
  No 17,731 (99.5%)   15,703 (88.6%) 2,028 (11.4%)  
  Yes 81 (0.5%)   73 (90.1%) 8 (9.9%)  
anti-TB med: Streptomycin 0.24
  No 17,797 (99.9%)   15,764 (88.6%) 2,033 (11.4%)  
  Yes 15 (0.1%)   12 (80.0%) 3 (20.0%)  
anti-TB med: 3-FDC(RHE) 0.28
  No 17,803 (99.9%)   15,769 (88.6%) 2,034 (11.4%)  
  Yes 9 (0.1%)   7 (77.8%) 2 (22.2%)  
anti-TB med: Ethambutol(E) 1.0
  No 17,806 (100.0%)   15,770 (88.6%) 2,036 (11.4%)  
  Yes 6 (0.0%)   6 (100.0%) 0 (0.0%)  
anti-TB med: Ethambutol(E) 0.18
  No 17,762 (99.7%)   15,735 (88.6%) 2,027 (11.4%)  
  Yes 50 (0.3%)   41 (82.0%) 9 (18.0%)  
anti-TB med: INH 0.17
  No 17,790 (99.9%)   15,754 (88.6%) 2,036 (11.4%)  
  Yes 22 (0.1%)   22 (100.0%) 0 (0.0%)  
anti-TB med: Other 1.0
  No 17,811 (100.0%)   15,775 (88.6%) 2,036 (11.4%)  
  Yes 1 (0.0%)   1 (100.0%) 0 (0.0%)  
anti-TB med: Pyrazinamide(Z) 0.18
  No 17,761 (99.7%)   15,734 (88.6%) 2,027 (11.4%)  
  Yes 51 (0.3%)   42 (82.4%) 9 (17.6%)  
TB Prophylaxis: INH 0.28
  No 17,016 (95.5%)   15,061 (88.5%) 1,955 (11.5%)  
  Yes 796 (4.5%)   715 (89.8%) 81 (10.2%)  
OI Prophylaxis < 0.0001
  No 3,309 (18.6%)   3,076 (93.0%) 233 (7.0%)  
  Yes 14,503 (81.4%)   12,700 (87.6%) 1,803 (12.4%)  
TB treatment 0.023
  No 17,277 (97.0%)   15,319 (88.7%) 1,958 (11.3%)  
  Yes 535 (3.0%)   457 (85.4%) 78 (14.6%)  
# current ARVs 0.22
  Mean (SD) 3.0 (±0.2)   3.0 (±0.2) 3.0 (±0.3)  
  Median (IQR) 3.0 (3.0 - 3.0)   3.0 (3.0 - 3.0) 3.0 (3.0 - 3.0)  
  Missing 1,754 (9.8%)   1,529 (9.7%) 225 (11.1%)  
ARVs taken last 7 days 0.30
  about half 0 (0.0%)   0 (%) 0 (%)  
  all 1,208 (6.8%)   1,014 (83.9%) 194 (16.1%)  
  most 1 (0.0%)   0 (0.0%) 1 (100.0%)  
  none 69 (0.4%)   59 (85.5%) 10 (14.5%)  
  very few 1 (0.0%)   1 (100.0%) 0 (0.0%)  
  Missing 16,533 (92.8%)   14,702 (88.9%) 1,831 (11.1%)  
ART adherence: percent taken since last visit 0.70
  Mean (SD) 98.5 (±12.4)   98.2 (±13.5) 100.0 (±0.0)  
  Median (IQR) 100.0 (100.0 - 100.0)   100.0 (100.0 - 100.0) 100.0 (100.0 - 100.0)  
  Missing 17,747 (99.6%)   15,721 (99.7%) 2,026 (99.5%)  
ARV Adherence- combines formats from both the old and the new CTC 2 1.0
  Good: fewer than 2 missed days 54 (0.3%)   52 (96.3%) 2 (3.7%)  
  Poor: 2 or more missed days 0 (0.0%)   0 (%) 0 (%)  
  Missing 17,758 (99.7%)   15,724 (88.5%) 2,034 (11.5%)  
ARV adherence since last visit < 0.0001
  FAIR (85-94%) 29 (0.2%)   20 (69.0%) 9 (31.0%)  
  GOOD (>, 95%) 3,221 (18.1%)   2,866 (89.0%) 355 (11.0%)  
  POOR (< 85%) 35 (0.2%)   23 (65.7%) 12 (34.3%)  
  Missing 14,527 (81.6%)   12,867 (88.6%) 1,660 (11.4%)  
‡

Bivariate Plots

To understand the relationship of each continuous variable with the y variable:

  1. Plot box plot for each of the variables to do a visual comparison between the groups
  2. Plot the explanatory variable distribution for both the variables to understand the variability uniquely explained (The non-intersecting part of the blue and the red is the variation explained by the variable)

Socio-demographics

## [1] "Height"

## [1] "Weight"

## [1] "bmi"

## [1] "ageatarvstart"

## [1] "ageatarvstartTHERAP"

## [1] "num_days_to_vl1"

## [1] "num_days_to_vl2"

## [1] "num_days_to_vl3"

## [1] "vl_count1"

## [1] "vl_count2"

## [1] "vl_count3"

## [1] "num_encs_to_vl1"

## [1] "num_encs_to_vl2"

## [1] "num_encs_to_vl3"

Univariate Analysis

For each continuous column, visually check the following:

  1. Variation in the column
  2. Its distribution
  3. Any outliers
  4. q-q plot with normal distribution
## [1] "Height"

## [1] "Weight"

## [1] "bmi"

## [1] "ageatarvstart"

## [1] "ageatarvstartTHERAP"

## [1] "num_days_to_vl1"

## [1] "num_days_to_vl2"

## [1] "num_days_to_vl3"

## [1] "vl_count1"

## [1] "vl_count2"

## [1] "vl_count3"

## [1] "num_encs_to_vl1"

## [1] "num_encs_to_vl2"

## [1] "num_encs_to_vl3"

For categorical variables,visually check the frequencies and percentages.

## [1] "vl_failure2" "vl_failure1" "male"        "Death"

## [1] "civilstatusENROL" "transfer"         "entrypoint"       "nhif"